import request from '@/utils/request'

// 一级分类
export const getCategoryListAPI = () => {
  return request({
    url: '/home/category/head'
  })
}
// 品牌推荐
export const getBrandListAPI = query => request({
  url: '/home/brand',
  params: query
})

// 首页->获取轮播图数据
export const getBannerListAPI = ({ num }) => request({
  url: '/home/banner',
  params: {
    distributionSite: num
  }
})

// 首页->获取新鲜好物数据
export const getNewGoodsListAPI = ({ count = 4 } = {}) => request({
  url: '/home/new',
  params: {
    limit: count
  }
})

// 首页->获取人气推荐数据
export const getHomeHotListAPI = () => request({
  url: '/home/hot'
})
